﻿using System;
using System.Collections.Generic;
using System.Net;
using System.Windows;
using System.Windows.Controls;
using System.Windows.Documents;
using System.Windows.Ink;
using System.Windows.Input;
using System.Windows.Media;
using System.Windows.Media.Animation;
using System.Windows.Shapes;

namespace Kit3D.Xml
{
    public class XmlElement : XmlNode
    {
        public string Name;
        public Dictionary<string, string> Attributes = new Dictionary<string, string>();
        public List<XmlElement> Children = new List<XmlElement>();
        public string Value;

        public List<XmlElement> GetChildren(string name)
        {
            var selected = new List<XmlElement>();
            foreach (var child in Children)
            {
                if (string.Compare(name, child.Name, StringComparison.CurrentCulture) == 0)
                    selected.Add(child);
            }
            return selected;
        }
    }
}
